38
|
How do I organize vertically the elements
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oElements
LOCAL oLinks
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oElements := oSwimLane:Elements()
oElements:Add("Element A"):ID := "A"
oElements:Add("Element B"):ID := "B"
oElements:Add("Element C"):ID := "C"
oElements:Add("Element D"):ID := "D"
oLinks := oSwimLane:Links()
oLinks:Add(oSwimLane:Elements:Item("A"),oSwimLane:Elements:Item("B"))
oLinks:Add(oSwimLane:Elements:Item("A"),oSwimLane:Elements:Item("C"))
oLinks:Add(oSwimLane:Elements:Item("B"),oSwimLane:Elements:Item("D"))
oLinks:Add(oSwimLane:Elements:Item("B"),oSwimLane:Elements:Item("C"))
oSwimLane:ShowLinksType := 2/*exLinkStraight*/
oSwimLane:SetProperty("DefArrange",0/*exDefArrangeDir*/,1)
oSwimLane:Arrange()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
37
|
How can I add programatically a link
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oElements
LOCAL oLinks
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oElements := oSwimLane:Elements()
oElements:Add("Element <sha ;;0>A")
oElements:Add("Element <sha ;;0>B",96,24)
oLinks := oSwimLane:Links()
oLinks:Add(oSwimLane:Elements:Item(1),oSwimLane:Elements:Item(2))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
36
|
How do I get the link from the cursor
PROCEDURE OnMouseMove(oSwimLane,Button,Shift,X,Y)
LOCAL l
l := oSwimLane:LinkFromPoint(-1,-1)
DevOut( Transform(l,"") )
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oElements
LOCAL oLinks
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oSwimLane,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/
oElements := oSwimLane:Elements()
oElements:Add("Element <sha ;;0>A")
oElements:Add("Element <sha ;;0>B",96,24)
oLinks := oSwimLane:Links()
oLinks:Add(oSwimLane:Elements:Item(1),oSwimLane:Elements:Item(2))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
35
|
Is there a way to create a link which has the same start and end element
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oElements
LOCAL oLinks
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oElements := oSwimLane:Elements()
oElements:Add("Element")
oLinks := oSwimLane:Links()
oLinks:Add(oSwimLane:Elements:Item(1),oSwimLane:Elements:Item(1))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
34
|
How can I show the pool's caption not-rotated or mirrored
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oPool
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oSwimLane:AllowDesignHeader := 4/*exDesignHeaderSingle*/
oPool := oSwimLane:Pools():Add(-150,-150,300,150)
oPool:HeaderCaptionSupportRotate := .F.
oPool:SetProperty("HeaderSize",0/*exHeaderLeft*/,48)
oPool:SetProperty("HeaderSize",2/*exHeaderRight*/,48)
oPool:Lane(0/*exLaneHorizontal*/):Children():Count := 3
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
33
|
How can I prevent creating sub-lanes or sub-phases
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oPool
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oSwimLane:AllowDesignHeader := 4/*exDesignHeaderSingle*/
oPool := oSwimLane:Pools():Add(-150,-150,300,150)
oPool:SetProperty("HeaderSize",0/*exHeaderLeft*/,32)
oPool:SetProperty("HeaderSize",2/*exHeaderRight*/,32)
oPool:Lane(0/*exLaneHorizontal*/):Children():Count := 3
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
32
|
How do I show a complete frame/border around the header
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oLanes
LOCAL oPool
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oPool := oSwimLane:Pools():Add(-150,-150,300,150)
oPool:SetProperty("HeaderSize",1/*exHeaderTop*/,32)
oPool:SetProperty("HeaderSize",3/*exHeaderBottom*/,32)
oLanes := oPool:Lane(1/*exLaneVertical*/):Children()
oLanes:Count := 3
oLanes:Item(1):Header():Pattern():Type := 768/*exPatternFrameThick*/
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
31
|
How do I show a complete frame/border around the lane
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oLanes
LOCAL oPool
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oPool := oSwimLane:Pools():Add(-150,-150,300,150)
oPool:SetProperty("HeaderSize",1/*exHeaderTop*/,32)
oPool:SetProperty("HeaderSize",3/*exHeaderBottom*/,32)
oLanes := oPool:Lane(1/*exLaneVertical*/):Children()
oLanes:Count := 3
oLanes:Item(1):Pattern():Type := 768/*exPatternFrameThick*/
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
30
|
How can I define sub-lanes
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oLanes
LOCAL oPool
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oPool := oSwimLane:Pools():Add(-150,-150,300,250)
oPool:SetProperty("HeaderSize",1/*exHeaderTop*/,32)
oPool:SetProperty("HeaderSize",3/*exHeaderBottom*/,32)
oLanes := oPool:Lane(1/*exLaneVertical*/):Children()
oLanes:Count := 3
oLanes:Item(1):Children():Count := 2
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
29
|
How can I add default lanes when the user creates a new pool
PROCEDURE OnAddPool(oSwimLane,Pool)
/*Pool.HeaderSize(1) = 24*/
/*Pool.HeaderVisible(0) = False*/
/*Pool.HeaderVisible(1) = True*/
/*Pool.HeaderVisible(2) = False*/
/*Pool.HeaderVisible(3) = False*/
/*Pool.Lane(1).Children.Count = 2*/
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:AddPool := {|Pool| OnAddPool(oSwimLane,Pool)} /*A new pool has been added to the surface.*/
oSwimLane:BeginUpdate()
oSwimLane:Pools():Add(-100,-100,250,250)
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
28
|
How do I prevent showing headers when the user creates new pools
PROCEDURE OnAddPool(oSwimLane,Pool)
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:AddPool := {|Pool| OnAddPool(oSwimLane,Pool)} /*A new pool has been added to the surface.*/
oSwimLane:BeginUpdate()
oSwimLane:Pools():Add(-100,-100,250,250):Lane(0/*exLaneHorizontal*/):Children():Count := 3
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
27
|
How can I display icons on headers
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oLanes
LOCAL oPool
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oSwimLane:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oPool := oSwimLane:Pools():Add(-100,-100,250,250)
oPool:SetProperty("HeaderVisible",0/*exHeaderLeft*/,.F.)
oPool:SetProperty("HeaderVisible",2/*exHeaderRight*/,.F.)
oPool:SetProperty("HeaderVisible",3/*exHeaderBottom*/,.F.)
oPool:SetProperty("HeaderSize",1/*exHeaderTop*/,24)
oLanes := oPool:Lane(1/*exLaneVertical*/):Children()
oLanes:Count := 3
oLanes:Item(0):Header():Caption := "<img>1</img> A"
oLanes:Item(1):Header():Caption := "<img>2</img> B"
oLanes:Item(2):Header():Caption := "<img>3</img> C"
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
26
|
How do I change the Lane and Phase strings being displayed on the lanes
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oPool
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oSwimLane:SetProperty("DefPoolHeaderCaptionFormat",.T.,"<fgcolor 808080>Faza <off -4><b><font ;6>%i")
oSwimLane:SetProperty("DefPoolHeaderCaptionFormat",.F.,"<fgcolor 808080>Culoar <off -4><b><font ;6>%i")
oPool := oSwimLane:Pools():Add(-100,-100,250,250)
oPool:Lane(0/*exLaneHorizontal*/):Children():Count := 3
oPool:Lane(1/*exLaneVertical*/):Children():Count := 3
oPool:Lane(1/*exLaneVertical*/):Children():Item(1):Header():Caption := "<fgcolor FF0000><b>NEW"
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
25
|
How can I enlarge the node while AutoSize property is True (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oElement
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:SetProperty("Background",90/*exElementBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oElement := oSwimLane:Elements():Add("Element",0,0):CallMethod("Copy",)
oElement:Caption := "Enlarged Element"
oElement:InflateSize := 16
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
24
|
How can I enlarge the node while AutoSize property is True (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oElement
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:SetProperty("Background",90/*exElementBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oElement := oSwimLane:Elements():Add("Element",0,0):CallMethod("Copy",)
oElement:Caption := "Enlarged Element"
oElement:SetProperty("Padding",-1/*exPaddingAll*/,16)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
23
|
How can I get the lane of the element
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oElement
LOCAL oSwimLane
LOCAL lane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oSwimLane:Pools():Add(-150,-150,500,250):Lane(0/*exLaneHorizontal*/):Children():Count := 3
oElement := oSwimLane:Elements():Add("Element")
oElement:CenterOnLane(.F.)
lane := oElement:LaneID(.F.)
DevOut( oSwimLane:LaneByID(lane):Header():Caption() )
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
22
|
How can I define a different shape for elements
PROCEDURE OnAddElement(oSwimLane,Element)
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oAppearance
LOCAL oElement,oElement1,oElement2,oElement3,oElement4
LOCAL oElements
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:AddElement := {|Element| OnAddElement(oSwimLane,Element)} /*A new element has been added to the surface.*/
oSwimLane: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nl2HxfiiMwQmMTZOmqLhaLsx9iUH6JAMI1hCDjECFQawhghjBG2DseoGQzhNHwDwTAMAsgTEeCUZI1Q5jFHyLodYmWxB8GsPEVIPwxhSD6Awb4dgJD2HsAQQIoAQEB")
oSwimLane:SetProperty("Background",90/*exElementBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oElements := oSwimLane:Elements()
oElements:Add("Rectangular",0,0):Shape := 0/*exShapeRectangular*/
oElements:Add("Round",82,0):Shape := 1/*exShapeRound*/
oElements:Add("Rhomb",138,0):Shape := 2/*exShapeRhomb*/
oElements:Add("Circle",196,0):Shape := 3/*exShapeCircle*/
oElement := oElements:Add("EBN 1",0,36)
oElement:SetProperty("BackColor",0x1000000)
oElement:Border := -1/*exNoLines*/
oElement1 := oElements:Add("EBN 2",54,36)
oElement1:SetProperty("BackColor",0x2000000)
oElement1:Border := -1/*exNoLines*/
oElement2 := oElements:Add("EBN 3",108,36)
oElement2:SetProperty("BackColor",0x3000000)
oElement2:Border := -1/*exNoLines*/
oElement3 := oElements:Add("EBN 4 ",160,36)
oElement3:SetProperty("BackColor",0x4000000)
oElement3:Border := -1/*exNoLines*/
oElement4 := oElements:Add("EBN 5 ",220,36)
oElement4:SetProperty("BackColor",0x5000000)
oElement4:MinHeight := 64
oElement4:MinWidth := 64
oElement4:Border := -1/*exNoLines*/
oSwimLane:SetProperty("ScrollPos",.F.,-160)
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
21
|
Is it possible to add an inner control on the surface
PROCEDURE OnOleEvent(oSwimLane,Element,Ev)
DevOut( Transform(Ev,"") )
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oElement
LOCAL oElements
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:OleEvent := {|Element,Ev| OnOleEvent(oSwimLane,Element,Ev)} /*Occurs once an inside control fires an event.*/
oElements := oSwimLane:Elements()
oElement := oElements:Add("activex hosting")
oElement:Type := 2/*exElementHostControl*/
oElement:Control := "Forms.CommandButton.1"
oElement:Caption := "Command Button"
oElement:Height := 64
oElement:Width := 128
oElement:ElementFormat := "14;" + CHR(34) + "caption" + CHR(34) + "/" + CHR(34) + "client" + CHR(34) + ""
oElement:CaptionAlign := 1/*exTopCenter*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
20
|
How can I create a copy of the element
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:SetProperty("Background",90/*exElementBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oSwimLane:Elements():Add("Element 1",0,0):CallMethod("Copy",):Caption := "Aka"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
19
|
How can I define an opaque background for elements
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:SetProperty("Background",90/*exElementBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oSwimLane:Elements():Add("Element 1",0,0)
oSwimLane:Elements():Add("Element 2",16,16)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
18
|
How can I show a different context-menu for all elements
PROCEDURE OnActionContextMenu(oSwimLane,Action,ObjectType,ObjectID,CommandID,CommandChecked,CommandCaption,CommandValue,Cancel)
DevOut( Transform(Action,"") )
DevOut( Transform(ObjectID,"") )
DevOut( Transform(CommandID,"") )
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:ActionContextMenu := {|Action,ObjectType,ObjectID,CommandID,CommandChecked,CommandCaption,CommandValue,Cancel| OnActionContextMenu(oSwimLane,Action,ObjectType,ObjectID,CommandID,CommandChecked,CommandCaption,CommandValue,Cancel)} /*Occurs when the user selects an item from the object's context menu.*/
oSwimLane:SetProperty("ContextMenu",4/*exContextMenuElement*/,"Item 1[id=1000],Item 2[id=2000]")
oSwimLane:SetProperty("Background",90/*exElementBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oSwimLane:Elements():Add("Element 1",0,0)
oSwimLane:Elements():Add("Element 2",16,16)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
17
|
How can I show a different context-menu for element
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
DevOut( Transform(oSwimLane:Elements:Add("Element",0,0):InvokeContextMenu("Item 1[id=1000],Item 2[id=2000]"),"") )
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
16
|
How can I change the design-modes being shown on the control's toolbar
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:DesignModes := "Read-Only#0,Allow Any#3,Only-Element#1,Only-Pool#2"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
15
|
How can I change the default header's background color
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oPool
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oPool := oSwimLane:Pools():Add(-250,-150,500,250)
oPool:Lane(0/*exLaneHorizontal*/):Children():Count := 4
oPool:Lane(1/*exLaneVertical*/):Children():Count := 4
oSwimLane:SetProperty("Background",120/*exPoolHorizontalHeaderBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 0,255,0 } ) , .F. ))
oSwimLane:SetProperty("Background",124/*exPoolVerticalHeaderBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 0,192,0 } ) , .F. ))
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
14
|
How can I remove the Design item from the control's toolbar, to be locked ( no-design )
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:ToolBarFormat := "-1,100,101"
oSwimLane:DesignMode := 0/*exDesignLock*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
13
|
How can I remove/disable the Color and Display-Grid from the surface's context menu
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:SetProperty("ContextMenu",24/*exContextMenuSurface*/,"Delete[id=-32004](All[id=-32000][ttp=Deletes all the objects from the surface],[sep],Elements[id=-32001][ttp=Deletes all elements from the surface],Links[id=-32002][ttp=Deletes all links from the surface],Pools[id=-32003][ttp=Deletes all pools from the surface])")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
12
|
How can I change the element's context-menu when the user right-clicks the element
PROCEDURE OnActionContextMenu(oSwimLane,Action,ObjectType,ObjectID,CommandID,CommandChecked,CommandCaption,CommandValue,Cancel)
/*ContextMenuObjectFromID(ObjectType,ObjectID).BackColor = RGB(255,255,0)*/
DevOut( Transform(Action,"") )
DevOut( Transform(CommandCaption,"") )
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:ActionContextMenu := {|Action,ObjectType,ObjectID,CommandID,CommandChecked,CommandCaption,CommandValue,Cancel| OnActionContextMenu(oSwimLane,Action,ObjectType,ObjectID,CommandID,CommandChecked,CommandCaption,CommandValue,Cancel)} /*Occurs when the user selects an item from the object's context menu.*/
oSwimLane:BeginUpdate()
oSwimLane:Elements():Add("element",0,0)
oSwimLane:SetProperty("ContextMenu",4/*exContextMenuElement*/,"Simple,Value[edit=123],[sep],Popup(Check 1[chk],Check 2[chk=1])")
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
11
|
How do I prevent showing the context-menu when user right-clicks the surface
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:SetProperty("ContextMenu",24/*exContextMenuSurface*/,"")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
10
|
How do I create parent-child (tree) lanes
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oLanes,oLanes1
LOCAL oPool
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oPool := oSwimLane:Pools():Add(-250,-150,500,250)
oPool:SetProperty("HeaderSize",1/*exHeaderTop*/,32)
oPool:SetProperty("HeaderVisible",3/*exHeaderBottom*/,.F.)
oLanes := oPool:Lane(1/*exLaneVertical*/):Children()
oLanes:Count := 2
oLanes1 := oLanes:Item(0):Children()
oLanes1:Count := 2
oLanes1:Item(0):Header():Caption := "Phase <b>1.1"
oLanes1:Item(1):Header():Caption := "Phase <b>1.2"
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
9
|
How do I create a pool with horizontal and lanes
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oPool
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oPool := oSwimLane:Pools():Add(-250,-150,500,250)
oPool:Lane(0/*exLaneHorizontal*/):Children():Count := 4
oPool:Lane(1/*exLaneVertical*/):Children():Count := 4
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
8
|
How do I add programatically a pool with horizontal lanes
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oPool
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oPool := oSwimLane:Pools():Add(-250,-150,500,250)
oPool:Lane(0/*exLaneHorizontal*/):Children():Count := 4
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
7
|
How do I add programatically a pool with vertical lanes
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oPool
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oPool := oSwimLane:Pools():Add(-250,-150,500,250)
oPool:Lane(1/*exLaneVertical*/):Children():Count := 4
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
6
|
How can I change the toolbar's visual appearance
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oSwimLane:SetProperty("Background",148/*exToolBarAppearance*/,0x1000000)
oSwimLane:SetProperty("Background",149/*exToolBarBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oSwimLane:SetProperty("Background",150/*exToolBarForeColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 40,40,40 } ) , .F. ))
oSwimLane:SetProperty("Background",153/*exToolBarButtonDownBackColor*/,0x1606060)
oSwimLane:SetProperty("Background",154/*exToolBarButtonDownForeColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. ))
oSwimLane:SetProperty("Background",155/*exToolBarButtonHotBackColor*/,0x1a0a0a0)
oSwimLane:SetProperty("Background",156/*exToolBarButtonHotForeColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
5
|
How can I change the toolbar's background color
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:SetProperty("Background",149/*exToolBarBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
4
|
How can I fit or ensure that all elements are in the control's client area
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oElements
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oElements := oSwimLane:Elements()
oElements:Add("Element A",-500,-500):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,255,0 } ) , .F. ))
oElements:Add("Element B",500,500):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oElements:Add("Element C",48,24)
oSwimLane:FitToClient()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
3
|
Context Menu - Microsoft Windows 8.1 - Ribbon Like
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oAppearance
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oAppearance := oSwimLane:VisualAppearance()
oAppearance:Add(1,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_background.ebn")
oAppearance:Add(2,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_groupt.ebn")
oAppearance:Add(12,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_hot.ebn")
oAppearance:Add(14,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_select.ebn")
oAppearance:Add(17,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_tab.ebn")
oAppearance:Add(18,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_tabhot.ebn")
oAppearance:Add(30,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_radio0.ebn")
oAppearance:Add(31,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_radio1.ebn")
oAppearance:Add(32,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_check0.ebn")
oAppearance:Add(33,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_check1.ebn")
oAppearance:Add(34,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_buttonu.ebn")
oAppearance:Add(35,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_buttond.ebn")
oSwimLane:SetProperty("Background",99/*exContextMenuAppearance*/,0x1000000)
oSwimLane:SetProperty("Background",64/*exToolTipAppearance*/,0x1fefefe)
oSwimLane:SetProperty("Background",102/*exContextMenuSelBackColor*/,0xe000000)
oSwimLane:SetProperty("Background",148/*exToolBarAppearance*/,0x1000000)
oSwimLane:SetProperty("Background",149/*exToolBarBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oSwimLane:SetProperty("Background",155/*exToolBarButtonHotBackColor*/,0xc000000)
oSwimLane:SetProperty("Background",153/*exToolBarButtonDownBackColor*/,0xe000000)
oSwimLane:SetProperty("Background",110/*exContextMenuHotBackColor*/,0xc000000)
oSwimLane:SetProperty("Background",112/*exContextMenuSelHotBackColor*/,0x23000000)
oSwimLane:SetProperty("Background",2/*0x2+*/,0x22000000)
oSwimLane:SetProperty("Background",3/*0x3+*/,0x23000000)
oSwimLane:SetProperty("Background",70/*exCheckBoxState0*/,0x20000000)
oSwimLane:SetProperty("Background",71/*exCheckBoxState1*/,0x21000000)
oSwimLane:SetProperty("Background",73/*exRadioButtonState0*/,0x1e000000)
oSwimLane:SetProperty("Background",74/*exRadioButtonState1*/,0x1f000000)
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
2
|
Context Menu - Microsoft Paint - Ribbon Like
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oAppearance
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oAppearance := oSwimLane:VisualAppearance()
oAppearance:Add(1,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_background.ebn")
oAppearance:Add(2,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_groupt.ebn")
oAppearance:Add(3,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_groupo.ebn")
oAppearance:Add(4,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_grouphot.ebn")
oAppearance:Add(5,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_frameh.ebn")
oAppearance:Add(6,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_framehs.ebn")
oAppearance:Add(7,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_framehi.ebn")
oAppearance:Add(8,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_framehe.ebn")
oAppearance:Add(9,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_framevs.ebn")
oAppearance:Add(10,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_framevi.ebn")
oAppearance:Add(11,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_frameve.ebn")
oAppearance:Add(12,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_select.ebn")
oAppearance:Add(13,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_bordert.ebn")
oAppearance:Add(14,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_buttond.ebn")
oAppearance:Add(15,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_buttonu.ebn")
oAppearance:Add(16,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_tab.ebn")
oAppearance:Add(17,"CP:16 0 0 0 1")
oAppearance:Add(18,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_tabhot.ebn")
oAppearance:Add(19,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_tabselhot.ebn")
oAppearance:Add(20,"CP:19 0 0 0 1")
oSwimLane:SetProperty("Background",99/*exContextMenuAppearance*/,0x1000000)
oSwimLane:SetProperty("Background",101/*exContextMenuForeColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 21,66,139 } ) , .F. ))
oSwimLane:SetProperty("Background",102/*exContextMenuSelBackColor*/,0xe000000)
oSwimLane:SetProperty("Background",64/*exToolTipAppearance*/,0x1fefefe)
oSwimLane:SetProperty("Background",148/*exToolBarAppearance*/,0x1000000)
oSwimLane:SetProperty("Background",149/*exToolBarBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oSwimLane:SetProperty("Background",155/*exToolBarButtonHotBackColor*/,0xd000000)
oSwimLane:SetProperty("Background",153/*exToolBarButtonDownBackColor*/,0x1000000)
oSwimLane:SetProperty("Background",2/*0x2+*/,0xd000000)
oSwimLane:SetProperty("Background",105/*exContextMenuGroupPopupFrameSingle*/,0x5000000)
oSwimLane:SetProperty("Background",106/*exContextMenuGroupPopupFrameHStart*/,0x6000000)
oSwimLane:SetProperty("Background",107/*exContextMenuGroupPopupFrameHIntermediate*/,0x7000000)
oSwimLane:SetProperty("Background",108/*exContextMenuGroupPopupFrameHEnd*/,0x8000000)
oSwimLane:SetProperty("Background",116/*exContextMenuGroupPopupFrameVStart*/,0x9000000)
oSwimLane:SetProperty("Background",117/*exContextMenuGroupPopupFrameVIntermediate*/,0xa000000)
oSwimLane:SetProperty("Background",118/*exContextMenuGroupPopupFrameVEnd*/,0xb000000)
oSwimLane:SetProperty("Background",110/*exContextMenuHotBackColor*/,0xc000000)
oSwimLane:SetProperty("Background",112/*exContextMenuSelHotBackColor*/,0xf000000)
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
1
|
Context Menu - Microsoft Office - Ribbon Like
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oAppearance
LOCAL oSwimLane
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
oSwimLane:CLSID := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
oSwimLane:create(,, {10,60},{610,370} )
oSwimLane:BeginUpdate()
oAppearance := oSwimLane:VisualAppearance()
oAppearance:Add(1,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_background.ebn")
oAppearance:Add(2,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_groupt.ebn")
oAppearance:Add(3,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_groupo.ebn")
oAppearance:Add(4,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_grouphot.ebn")
oAppearance:Add(5,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_frameh.ebn")
oAppearance:Add(6,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_framehs.ebn")
oAppearance:Add(7,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_framehi.ebn")
oAppearance:Add(8,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_framehe.ebn")
oAppearance:Add(9,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_framevs.ebn")
oAppearance:Add(10,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_framevi.ebn")
oAppearance:Add(11,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_frameve.ebn")
oAppearance:Add(12,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_select.ebn")
oAppearance:Add(13,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_bordert.ebn")
oAppearance:Add(14,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_buttond.ebn")
oAppearance:Add(15,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_buttonu.ebn")
oAppearance:Add(16,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_tab.ebn")
oAppearance:Add(17,"CP:16 0 0 0 1")
oAppearance:Add(18,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_tabhot.ebn")
oAppearance:Add(19,"C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_tabselhot.ebn")
oAppearance:Add(20,"CP:19 0 0 0 1")
oSwimLane:SetProperty("Background",99/*exContextMenuAppearance*/,0x1000000)
oSwimLane:SetProperty("Background",101/*exContextMenuForeColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 21,66,139 } ) , .F. ))
oSwimLane:SetProperty("Background",64/*exToolTipAppearance*/,0x1fefefe)
oSwimLane:SetProperty("Background",148/*exToolBarAppearance*/,0x1000000)
oSwimLane:SetProperty("Background",149/*exToolBarBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oSwimLane:SetProperty("Background",155/*exToolBarButtonHotBackColor*/,0xd000000)
oSwimLane:SetProperty("Background",153/*exToolBarButtonDownBackColor*/,0x1000000)
oSwimLane:SetProperty("Background",2/*0x2+*/,0xd000000)
oSwimLane:SetProperty("Background",3/*0x3+*/,0x1000000)
oSwimLane:SetProperty("Background",105/*exContextMenuGroupPopupFrameSingle*/,0x5000000)
oSwimLane:SetProperty("Background",106/*exContextMenuGroupPopupFrameHStart*/,0x6000000)
oSwimLane:SetProperty("Background",107/*exContextMenuGroupPopupFrameHIntermediate*/,0x7000000)
oSwimLane:SetProperty("Background",108/*exContextMenuGroupPopupFrameHEnd*/,0x8000000)
oSwimLane:SetProperty("Background",116/*exContextMenuGroupPopupFrameVStart*/,0x9000000)
oSwimLane:SetProperty("Background",117/*exContextMenuGroupPopupFrameVIntermediate*/,0xa000000)
oSwimLane:SetProperty("Background",118/*exContextMenuGroupPopupFrameVEnd*/,0xb000000)
oSwimLane:SetProperty("Background",110/*exContextMenuHotBackColor*/,0xc000000)
oSwimLane:SetProperty("Background",102/*exContextMenuSelBackColor*/,0xe000000)
oSwimLane:SetProperty("Background",112/*exContextMenuSelHotBackColor*/,0xf000000)
oSwimLane:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|